Integrand size = 23, antiderivative size = 57 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b)^2 \csc ^2(e+f x)}{2 f}-\frac {b^2 \log (\cos (e+f x))}{f}-\frac {\left (a^2-b^2\right ) \log (\sin (e+f x))}{f} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4223, 457, 90} \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {\left (a^2-b^2\right ) \log (\sin (e+f x))}{f}-\frac {(a+b)^2 \csc ^2(e+f x)}{2 f}-\frac {b^2 \log (\cos (e+f x))}{f} \]
[In]
[Out]
Rule 90
Rule 457
Rule 4223
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {(b+a x)^2}{(1-x)^2 x} \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {(a+b)^2}{(-1+x)^2}+\frac {a^2-b^2}{-1+x}+\frac {b^2}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {(a+b)^2 \csc ^2(e+f x)}{2 f}-\frac {b^2 \log (\cos (e+f x))}{f}-\frac {\left (a^2-b^2\right ) \log (\sin (e+f x))}{f} \\ \end{align*}
Time = 0.20 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.42 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {2 \left (b+a \cos ^2(e+f x)\right )^2 \left ((a+b)^2 \csc ^2(e+f x)+2 b^2 \log (\cos (e+f x))+2 \left (a^2-b^2\right ) \log (\sin (e+f x))\right )}{f (a+2 b+a \cos (2 (e+f x)))^2} \]
[In]
[Out]
Time = 2.62 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )-\frac {a b}{\sin \left (f x +e \right )^{2}}+b^{2} \left (-\frac {1}{2 \sin \left (f x +e \right )^{2}}+\ln \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(64\) |
default | \(\frac {a^{2} \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )-\frac {a b}{\sin \left (f x +e \right )^{2}}+b^{2} \left (-\frac {1}{2 \sin \left (f x +e \right )^{2}}+\ln \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(64\) |
risch | \(i a^{2} x +\frac {2 i a^{2} e}{f}+\frac {2 \left (a^{2}+2 a b +b^{2}\right ) {\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) a^{2}}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b^{2}}{f}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(116\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.75 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {a^{2} + 2 \, a b + b^{2} - {\left (b^{2} \cos \left (f x + e\right )^{2} - b^{2}\right )} \log \left (\cos \left (f x + e\right )^{2}\right ) - {\left ({\left (a^{2} - b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} + b^{2}\right )} \log \left (-\frac {1}{4} \, \cos \left (f x + e\right )^{2} + \frac {1}{4}\right )}{2 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \]
[In]
[Out]
\[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \cot ^{3}{\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.05 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {b^{2} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {a^{2} + 2 \, a b + b^{2}}{\sin \left (f x + e\right )^{2}}}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (55) = 110\).
Time = 0.33 (sec) , antiderivative size = 233, normalized size of antiderivative = 4.09 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {a^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, a b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + b^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 4 \, a^{2} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right ) - 4 \, b^{2} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right )}{8 \, f} \]
[In]
[Out]
Time = 20.28 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.19 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2-b^2\right )}{f}-\frac {{\mathrm {cot}\left (e+f\,x\right )}^2\,\left (\frac {a^2}{2}+a\,b+\frac {b^2}{2}\right )}{f} \]
[In]
[Out]